home *** CD-ROM | disk | FTP | other *** search
- /*
- $Id$
- $Log$
- */
-
- #include <stdio.h>
- #include <stdlib.h>
- #include "exec_intern.h"
- #include <clib/aros_protos.h>
- #include <aros/lvo.h>
-
- #define NUM_EXEC_LVOS 130
-
- struct
- {
- LVEntry el_LVO[NUM_EXEC_LVOS];
- struct ExecBase el_LibBase;
- } ExecLibrary;
-
- #include "inittable.h"
-
- struct ExecBase * ExecBase = &ExecLibrary.el_LibBase;
-
-
- void __AROS_Unsupported (struct Library * lib)
- {
- fprintf (stderr, "An Unsupported Function has been called for %08lx\n"
- , lib);
- exit (100); /* Alert() ? */
- } /* __AROS_Unsupported */
-
- void __AROS_InitExecBase (void)
- {
- LVEntry * entry;
- int t;
-
- entry = (LVEntry *)ExecBase;
-
- for (t=-1; t>=-NUM_EXEC_LVOS; t--)
- {
- entry->lve_Jmp = M68k_JMP;
- entry->lve_FuncPtr = (APTR)__AROS_Unsupported;
- }
-
- for (t=0; t<(sizeof (InitTable)/sizeof (InitTable[0])); t++)
- {
- entry = __AROS_LVO_GET(ExecBase,InitTable[t].it_Offset);
-
- entry->lve_FuncPtr = InitTable[t].it_Func;
- }
-
- /* Initialize the lib-base by hand */
- ExecBase->LibNode.lib_Flags = 0;
- ExecBase->LibNode.lib_pad = 0;
- ExecBase->LibNode.lib_NegSize = NUM_EXEC_LVOS * LIB_VECTSIZE;
- ExecBase->LibNode.lib_PosSize = sizeof (struct ExecBase)
- - sizeof (struct Library);
- ExecBase->LibNode.lib_Version = 40;
- ExecBase->LibNode.lib_Revision = 70;
- ExecBase->LibNode.lib_IdString = "exec.library";
- ExecBase->LibNode.lib_Sum = 0L;
- ExecBase->LibNode.lib_OpenCnt = 1L; /* Never try to expunge */
-
- /* Calculate the checksum */
- ExecBase->LibNode.lib_Sum = CalcChecksum (&ExecLibrary
- , sizeof (ExecLibrary));
-
- } /* __AROS_InitExecBase */
-
-